﻿/*
 * 2008.06.02 snail create, WebIM通用方法
 */

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

using Model.WWW_WWW.WebIM;
using BLL.WWW_WWW.WebIM;

namespace BLF.WWW_WWW.WebIM
{
    public class asyproxy
    {
        public asyproxy() {

        }

        /// <summary>
        /// 2008.06.02 snail create, 获得A和B的聊天记录。
        /// </summary>
        /// <param name="jidA">A的id</param>
        /// <param name="jidB">B的id</param>
        /// <returns></returns>
        public static List<ChatLog> GetChatLog(string jidA, string jidB) {
            return new WebIMSystem().GetChatLog(jidA, jidB);
        }

        /// <summary>
        /// 2008.06.06 snail create, 获得离线消息数目。
        /// </summary>
        /// <param name="jid">用户编号</param>
        /// <returns>离线消息数量</returns>
        public static int GetOfflineMessageCount(string jid) {
            return new WebIMSystem().GetOfflineMessageCount(jid);
        }

        /// <summary>
        /// 2008.06.10 snail create, 通过一组用户编号获得该组用户的在离线状态值。
        /// </summary>
        /// <param name="userJids">用户编号数组</param>
        /// <returns>
        /// 返回值如下:<example>string[]{'T000000001,0','T000000002',1}</example>
        /// >0时表示在线
        /// </returns>
        public static string[] GetUserOnline(string[] userJids) {
            return new WebIMSystem().GetUserOnline(userJids);
        }

        /// <summary>
        /// 2008.06.10 snail create, 获得单个用户的在线值。
        /// </summary>
        /// <param name="jid">用户编号</param>
        /// <returns></returns>
        public static bool GetSingleUserOnline(string jid) {
            return new WebIMSystem().GetSingleUserOnline(jid);
        }
    }
}